import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
import java.sql.ResultSet;

public class executeQueryFail{
    public static void main(String[] args){
        try{
            Class.forName("com.mysql.jdbc.Driver");
            
            String url = "jdbc:mysql://localhost:3306/hw23?useSSL=false";
            String username = "root";
            String password = "";
            Connection conn = DriverManager.getConnection(url, username, password);
            
            Statement stmt = conn.createStatement();
            
            String sql = "select * from student where code = 100";
            ResultSet rs = stmt.executeQuery(sql);
            System.out.println(rs.getRow());
        }catch(Exception e){
            e.printStackTrace();
        }
    }
}